package com.myproject.filmrecommendationsys.service.impl;

import java.util.List;

import com.myproject.filmrecommendationsys.domain.Film;
import com.myproject.filmrecommendationsys.mapper.FilmMapper;
import com.myproject.filmrecommendationsys.service.IFilmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 影视Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-11
 */
@Service
public class FilmServiceImpl implements IFilmService
{
    @Autowired
    private FilmMapper filmMapper;

    /**
     * 查询影视
     *
     * @param id 影视主键
     * @return 影视
     */
    @Override
    public Film selectFilmById(Long id)
    {
        return filmMapper.selectFilmById(id);
    }

    /**
     * 查询影视列表
     *
     * @param film 影视
     * @return 影视
     */
    @Override
    public List<Film> selectFilmList(Film film)
    {
        return filmMapper.selectFilmList(film);
    }

    /**
     * 新增影视
     *
     * @param film 影视
     * @return 结果
     */
    @Override
    public int insertFilm(Film film)
    {
        return filmMapper.insertFilm(film);
    }

    /**
     * 修改影视
     *
     * @param film 影视
     * @return 结果
     */
    @Override
    public int updateFilm(Film film)
    {
        return filmMapper.updateFilm(film);
    }

    /**
     * 批量删除影视
     *
     * @param ids 需要删除的影视主键
     * @return 结果
     */
    @Override
    public int deleteFilmByIds(Long[] ids)
    {
        return filmMapper.deleteFilmByIds(ids);
    }

    /**
     * 删除影视信息
     *
     * @param id 影视主键
     * @return 结果
     */
    @Override
    public int deleteFilmById(Long id)
    {
        return filmMapper.deleteFilmById(id);
    }
}
